\(\int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx\) [145]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 41 \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{\sqrt {b} f} \]

[Out]

-arctan(cos(f*x+e)*b^(1/2)/(a+b-b*cos(f*x+e)^2)^(1/2))/f/b^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3265, 223, 209} \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )}{\sqrt {b} f} \]

[In]

Int[Sin[e + f*x]/Sqrt[a + b*Sin[e + f*x]^2],x]

[Out]

-(ArcTan[(Sqrt[b]*Cos[e + f*x])/Sqrt[a + b - b*Cos[e + f*x]^2]]/(Sqrt[b]*f))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {1}{\sqrt {a+b-b x^2}} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {1}{1+b x^2} \, dx,x,\frac {\cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{f} \\ & = -\frac {\arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{\sqrt {b} f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.29 \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {\log \left (\sqrt {2} \sqrt {-b} \cos (e+f x)+\sqrt {2 a+b-b \cos (2 (e+f x))}\right )}{\sqrt {-b} f} \]

[In]

Integrate[Sin[e + f*x]/Sqrt[a + b*Sin[e + f*x]^2],x]

[Out]

-(Log[Sqrt[2]*Sqrt[-b]*Cos[e + f*x] + Sqrt[2*a + b - b*Cos[2*(e + f*x)]]]/(Sqrt[-b]*f))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(98\) vs. \(2(35)=70\).

Time = 0.65 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.41

method result size
default \(\frac {\sqrt {\left (\cos ^{2}\left (f x +e \right )\right ) \left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )}\, \arctan \left (\frac {2 b \left (\sin ^{2}\left (f x +e \right )\right )+a -b}{2 \sqrt {b}\, \sqrt {\left (\cos ^{2}\left (f x +e \right )\right ) \left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )}}\right )}{2 \sqrt {b}\, \cos \left (f x +e \right ) \sqrt {a +b \left (\sin ^{2}\left (f x +e \right )\right )}\, f}\) \(99\)

[In]

int(sin(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*(cos(f*x+e)^2*(a+b*sin(f*x+e)^2))^(1/2)/b^(1/2)*arctan(1/2/b^(1/2)*(2*b*sin(f*x+e)^2+a-b)/(cos(f*x+e)^2*(a
+b*sin(f*x+e)^2))^(1/2))/cos(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2)/f

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (35) = 70\).

Time = 0.35 (sec) , antiderivative size = 370, normalized size of antiderivative = 9.02 \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\left [-\frac {\sqrt {-b} \log \left (128 \, b^{4} \cos \left (f x + e\right )^{8} - 256 \, {\left (a b^{3} + b^{4}\right )} \cos \left (f x + e\right )^{6} + 160 \, {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \cos \left (f x + e\right )^{4} + a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4} - 32 \, {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} \cos \left (f x + e\right )^{2} + 8 \, {\left (16 \, b^{3} \cos \left (f x + e\right )^{7} - 24 \, {\left (a b^{2} + b^{3}\right )} \cos \left (f x + e\right )^{5} + 10 \, {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {-b}\right )}{8 \, b f}, \frac {\arctan \left (\frac {{\left (8 \, b^{2} \cos \left (f x + e\right )^{4} - 8 \, {\left (a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {b}}{4 \, {\left (2 \, b^{3} \cos \left (f x + e\right )^{5} - 3 \, {\left (a b^{2} + b^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \cos \left (f x + e\right )\right )}}\right )}{4 \, \sqrt {b} f}\right ] \]

[In]

integrate(sin(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/8*sqrt(-b)*log(128*b^4*cos(f*x + e)^8 - 256*(a*b^3 + b^4)*cos(f*x + e)^6 + 160*(a^2*b^2 + 2*a*b^3 + b^4)*c
os(f*x + e)^4 + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4 - 32*(a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*cos(f*x + e
)^2 + 8*(16*b^3*cos(f*x + e)^7 - 24*(a*b^2 + b^3)*cos(f*x + e)^5 + 10*(a^2*b + 2*a*b^2 + b^3)*cos(f*x + e)^3 -
 (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(f*x + e))*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(-b))/(b*f), 1/4*arctan(1/4
*(8*b^2*cos(f*x + e)^4 - 8*(a*b + b^2)*cos(f*x + e)^2 + a^2 + 2*a*b + b^2)*sqrt(-b*cos(f*x + e)^2 + a + b)*sqr
t(b)/(2*b^3*cos(f*x + e)^5 - 3*(a*b^2 + b^3)*cos(f*x + e)^3 + (a^2*b + 2*a*b^2 + b^3)*cos(f*x + e)))/(sqrt(b)*
f)]

Sympy [F]

\[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int \frac {\sin {\left (e + f x \right )}}{\sqrt {a + b \sin ^{2}{\left (e + f x \right )}}}\, dx \]

[In]

integrate(sin(f*x+e)/(a+b*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(sin(e + f*x)/sqrt(a + b*sin(e + f*x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.59 \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {\arcsin \left (\frac {b \cos \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {b} f} \]

[In]

integrate(sin(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

-arcsin(b*cos(f*x + e)/sqrt((a + b)*b))/(sqrt(b)*f)

Giac [F]

\[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int { \frac {\sin \left (f x + e\right )}{\sqrt {b \sin \left (f x + e\right )^{2} + a}} \,d x } \]

[In]

integrate(sin(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int \frac {\sin \left (e+f\,x\right )}{\sqrt {b\,{\sin \left (e+f\,x\right )}^2+a}} \,d x \]

[In]

int(sin(e + f*x)/(a + b*sin(e + f*x)^2)^(1/2),x)

[Out]

int(sin(e + f*x)/(a + b*sin(e + f*x)^2)^(1/2), x)